package qc.module.platform.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import qc.module.platform.dto.config.ConfigDto;
import qc.module.platform.entity.QcProjectConfigs;

import java.util.List;

/**
 * ProjectConfigsMapper
 *
 * @author QuCheng Tech
 * @create 2023/02/06
 */

@Mapper
public interface ProjectConfigsMapper {
    ProjectConfigsMapper MAPPER = Mappers.getMapper(ProjectConfigsMapper.class);

    @Mapping(target = "value" , source = "keyvalue")
    @Mapping(target = "key", source = "keycode")
    @Mapping(target = "order", source = "odr")
    ConfigDto toDto(QcProjectConfigs en);

    List<ConfigDto> toDtoLsit(List<QcProjectConfigs> list);
}
